package com.leo.boot.feature.merge.domain;

import com.leo.boot.feature.merge.CommonUtils;
import com.leo.boot.feature.merge.Mergeable;
import com.leo.boot.feature.merge.Merging;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

@Data
@Accessors(chain = true, fluent = true)
public class Order implements Mergeable<Order> {

    @Merging(ignore = true)
    private long id;

    @Merging(op = "any", test = "equals", utils = CommonUtils.class)
    private String name;

    private Integer quantity;

    private BigDecimal amount;
}
